<template>
  <view>
    <image class="bg" src="../../static/my/bg.png" mode="aspectFill" />
    <view class="back" @click="goBack">
      <u-icon name="arrow-left" size="24" color="#fff"></u-icon>
    </view>
    <view class="gzBox"><u-icon name="plus" color="#fff" size="14"></u-icon>关注</view>
    <view class="info">
      <view class="tit"
        >杭州艺星医疗美容医院

        <image src="" mode="aspectFill" />
      </view>
      <view class="line">
        <view class="label">金牌加盟商</view>
        <view>浏览量3.1万｜商品40</view>
      </view>
      <view class="ctn"> 艺星医美整容医院_杭州艺星整形,口碑整形排名,是评价好的整形医院,大型正规,高档整形环境,拥有国内外大咖整形医生团,整形美容全项目,个性定制打造专属美丽</view>
      <view class="sj">营业中 09:30-20:00 </view>
      <view class="dz">
        <view>地址 杭州市西湖区拉美路999号</view>
        <view class="ricon">
          <image src="../../static/shop/dh.png" mode="aspectFill" />
          <view>|</view>
          <image src="../../static/shop/tel.png" mode="aspectFill" />
        </view>
      </view>
    </view>
    <view style="background: #fff; padding-top: 20rpx; margin-top: 20rpx">
      <view class="flBox">
        <view class="tabBox">
          <view @click="tabActive = '1'" :class="{ tabItem: true, active: tabActive == '1' }">店铺服务</view>
          <view @click="tabActive = '2'" :class="{ tabItem: true, active: tabActive == '2' }">店铺商品</view>
          <view @click="tabActive = '3'" :class="{ tabItem: true, active: tabActive == '3' }">店铺资料</view>
        </view>
      </view>
      <view class="tabsCon">
        <view class="tabsBox">
          <view class="itemBox" v-for="(item, index) in list1">
            <view @click="tabActive1 = item.name" :class="{ default: true, active: tabActive1 == item.name }">{{ item.name }}</view>
          </view>
        </view>
      </view>
    </view>
    <view class="spBox" v-if="tabActive === '1'">
      <view style="width: 48%" v-for="(item, index) in 3" :key="index">
        <FwItem />
      </view>
    </view>
    <view class="listBox" v-if="tabActive === '2'">
      <view style="width: 49%" v-for="(item, index) in 5">
        <GoodsItem />
      </view>
    </view>
    <view class="dpzl" v-if="tabActive === '3'">
      <view class="main">
        <view>基础信息</view>
        <view class="top">
          <image src="" mode="aspectFill" />
          <view class="r">
            <view class="t">杭州艺星医疗美容医院</view>
            <view> 医疗整形医院</view>
          </view>
        </view>
        <view class="dh">
          <view class="heng">
            <view class="label">成立时间</view>
            <view class="value">2020-06-22</view>
          </view>
          <view class="heng">
            <view class="label">营业时间</view>
            <view class="value">09:30-20:00</view>
          </view>
        </view>
        <view class="dh">
          <view class="heng">
            <view class="label">医院面积</view>
            <view class="value">8000 平方米手</view>
          </view>
          <view class="heng">
            <view class="label">医美科室</view>
            <view class="value">无创，皮肤</view>
          </view>
        </view>
        <view class="dh">
          <view class="heng">
            <view class="label">商家简介</view>
            <view class="value">杭州熙禾医疗美容占地8000平米，连续2年蝉联新氧亚太医美行业全国十大吸脂名院是国内微创精雕的品牌机构。</view>
          </view>
        </view>
      </view>
      <view class="main">
        <view>医院环境</view>
        <u-scroll-list :indicator="false">
          <view v-for="(item, index) in 4" :key="index">
            <image class="pjImg" src="" mode=""></image>
          </view>
        </u-scroll-list>
      </view>
      <view class="main">
        <view>医院荣誉</view>
        <u-scroll-list :indicator="false">
          <view v-for="(item, index) in 4" :key="index">
            <image class="pjImg" src="" mode=""></image>
          </view>
        </u-scroll-list>
      </view>
    </view>
  </view>
</template>
<script setup lang="ts">
import { goBack } from "@/utils/commonFn";
import { ref } from "vue";
import FwItem from "../home/components/FwItem.vue";
import GoodsItem from "./components/GoodsItem.vue";
// 创建响应式数据
const list1 = ref([{ name: "推荐" }, { name: "品牌好物" }, { name: "休闲食品" }, { name: "服饰鞋包" }, { name: "日用百货" }]);
const tabActive = ref("1");
const tabActive1 = ref("推荐");
</script>
<style lang="less" scoped>
.bg {
  height: 284rpx;
  width: 100%;
}
.gzBox {
  background: #81d8d0;
  border-radius: 200rpx 200rpx 200rpx 200rpx;
  position: absolute;
  top: 102rpx;
  right: 32rpx;
  display: flex;
  align-items: center;
  padding: 16rpx;
  font-size: 28rpx;
  color: #ffffff;
  gap: 8rpx;
}
.info {
  padding: 32rpx;
  background: #fff;
  .tit {
    font-size: 40rpx;
    color: #333333;
    display: flex;
    justify-content: space-between;
    font-weight: bold;
    image {
      width: 164rpx;
      height: 164rpx;
      background: #698a9a;
      margin-top: -130rpx;
      border-radius: 50%;
    }
  }
  .line {
    display: flex;
    align-items: center;
    margin-top: 22rpx;
    font-size: 24rpx;
    color: #8a8a8d;
    .label {
      background: #fff0c3;
      border-radius: 8rpx 8rpx 8rpx 8rpx;
      font-size: 24rpx;
      color: #563010;
      padding: 8rpx;
      margin-right: 20rpx;
    }
  }
  .ctn {
    font-size: 24rpx;
    color: #333333;
    margin-top: 22rpx;
  }
  .sj {
    font-size: 24rpx;
    color: #8a8a8d;
    margin-top: 20rpx;
  }
  .dz {
    display: flex;
    align-items: center;
    font-size: 24rpx;
    color: #8a8a8d;
    justify-content: space-between;
    margin-top: 16rpx;
    .ricon {
      display: flex;
      align-items: center;
      color: #c6c6c6;
      gap: 15rpx;
      image {
        width: 32rpx;
        height: 32rpx;
      }
    }
  }
}
.flBox {
  background: #ffffff;
  padding: 0rpx 32rpx;
  .tabBox {
    padding: 0 30rpx;
    display: flex;
    justify-content: space-between;
    .tabItem {
      font-size: 32rpx;
      color: #333333;
    }
    .active {
      font-size: 36rpx;
      color: #333333;
      font-weight: bold;
      position: relative;
      z-index: 2;
      &::before {
        content: "";
        position: absolute;
        left: 30%;
        bottom: -10rpx;
        width: 40rpx;
        height: 6rpx;
        background: #80d7cf;
        z-index: 1;
      }
    }
  }
}
.tabsCon {
  padding: 32rpx;
}
.spBox {
  background: #fff;
  margin-top: 20rpx;
  padding: 20rpx 32rpx;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}
.listBox {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  background-color: #f3f4f6;
  margin-top: 20rpx;
}
.main {
  background: #ffffff;
  border-radius: 16rpx 16rpx 16rpx 16rpx;
  padding: 32rpx;
  .top {
    display: flex;
    align-items: center;
    margin: 32rpx 0;
    image {
      width: 96rpx;
      height: 96rpx;
      border-radius: 50%;
      background: #a8adb5;
      margin-right: 24rpx;
    }
    .r {
      font-size: 24rpx;
      color: #8a8a8d;
      .t {
        font-size: 30rpx;
        color: #333333;
        margin-bottom: 8rpx;
      }
    }
  }
  .dh {
    display: flex;
    justify-content: space-between;
    .heng {
      display: flex;
      margin-bottom: 18rpx;
      .label {
        width: 96rpx;
        font-size: 24rpx;
        color: #8a8a8d;
        flex-shrink: 0;
        margin-right: 32rpx;
      }
      .value {
        font-size: 24rpx;
        color: #333333;
      }
    }
  }
}
.pjImg {
  width: 240rpx;
  height: 160rpx;
  border-radius: 16rpx;
  margin-right: 15rpx;
  background: salmon;
  margin-top: 20rpx;
}
</style>
